# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-aiosqlite
pkgver=0.19.0
pkgrel=0
pkgdesc="AsyncIO bridge to the standard Sqlite3 module"
url="https://aiosqlite.omnilib.dev/"
arch="noarch"
license="MIT"
makedepends="
	py3-flit-core
	py3-gpep517
	"
subpackages="$pkgname-pyc"
source="https://github.com/omnilib/aiosqlite/archive/v$pkgver/py3-aiosqlite-$pkgver.tar.gz"
builddir="$srcdir/aiosqlite-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m aiosqlite.tests
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
	rm -r "$pkgdir"/usr/lib/python*/site-packages/aiosqlite/tests
}

sha512sums="
4e5b9d171dd8f6b95e29fa5fd05ec4ce3ba7e95293c57fbffdd5189a03d0eba03f9b318adef1da011e22bfa4bd6b914903ea578d68eefad558533ae21b75b79a  py3-aiosqlite-0.19.0.tar.gz
"
